package edu.sctu.practice.class02.yangshengyu.one10;

/**
 * Created by Cullen on 2015/8/3.
 *
 */
public class N6 {
    public static void main(String[] args) {
        double i;
        int n=2;
        double sum=1;
        do {
            i=(double)1/n;
            sum=sum+i;
            n++;
        }while(sum<=5.0);
        System.out.println("n的值是："+n);
    }
}
